package com.xianshijian.oauth.server.dao;

import java.io.Serializable;

import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import com.xianshijian.oauth.server.cache.CacheKey;
import com.xianshijian.oauth.server.entity.ThirdParty;

/**
 * 第三方Dao
 * 
 * @author lzj
 *
 */
public interface ThirdPartyDao extends JpaRepository<ThirdParty, Serializable>, JpaSpecificationExecutor<ThirdParty> {
	
//	@Cacheable(value = ClientCacheKey.CLIENT_ID_CACHE, key = "#p0")
    ThirdParty findByThirdPartyId(String thirdPartyId);
	
//	@Cacheable(value = ClientCacheKey.CLIENT_SECRET_CACHE, key = "#p0")
    ThirdParty findByThirdPartySecret(String thirdPartySecret);
    

}
